package com.bcmusic.search.service;

import com.bcmusic.music.pojo.Music;

import javax.naming.directory.SearchResult;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ESService {
    /**
     * 查询版权信息
     *
     * @param musicId
     * @return
     */
    List<Map<String, Object>> getCopyright(Integer musicId) throws Exception;

    /**
     * 查询音乐
     * @param musicName
     * @param composer
     * @param lyricist
     * @param singer
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> getMusic(String musicName,String singer,String lyricist,String composer) throws Exception;

    /**
     * 批量插入音乐信息以及版权信息，后台调用
     * @param indexName
     * @param itemVOList
     */
    void bulkSave(String indexName, List<?> itemVOList);

    /**
     * 创建索引 后台调用
     * @param indexName
     * @return
     */
    boolean createItemIndex(String indexName);

    /**
     * 根据注册码精确查询音乐
     * @param registercode
     * @return
     */
    List<Map<String, Object>> preciseQueryMusic(String registercode) throws IOException;

    /**
     * 根据授权码精确查询授权
     * @param authorizationCode
     * @return
     */
    List<Map<String, Object>> preciseQueryAuthorization(String authorizationCode) throws IOException;
}
